package android.framework.paging;

import android.support.v4.view.ViewPager;

public class MultipleViewsActivity extends BaseActivity{
	
	private ViewPager viewPager;
	private ConcretePagerAdapter pagerAdapter;
	private int viewPageResource;
	
	public MultipleViewsActivity(int viewPageResource) {
		this.viewPageResource = viewPageResource;
	}
	
	@Override
	public void setContentView(int layoutResID){
		super.setContentView(layoutResID);
		viewPager = (ViewPager)findViewById(viewPageResource);
        pagerAdapter = new ConcretePagerAdapter();
        viewPager.setAdapter(pagerAdapter);
	}
	
	
	protected void addNewView(BaseViewInitializer view){
		pagerAdapter.addViewInitializer(view);
	}
}
